package ar.edu.utn.frsf.proyectofinal.sistemadecontrolmodbus.persistence.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="SOUND_REQ")
public class SoundRequest {
	
	@Id
	@Column(name="id")
	@SequenceGenerator(name = "SecuenciaSondeo", sequenceName = "seq_sound", allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SecuenciaSondeo")
	private Integer ID;
	
	@ManyToOne
	@JoinColumn(name="dev_type")
	private DeviceType deviceType;
	
	@Column(name="address_type")
	private AddressType addressType;
	
	@Column(name="address")
	private Integer address;
	
	@Column(name="count")
	private Integer count;
	/**
	 * @return the iD
	 */
	public Integer getID() {
		return ID;
	}
	/**
	 * @param iD the iD to set
	 */
	public void setID(Integer iD) {
		ID = iD;
	}
	/**
	 * @return the deviceType
	 */
	public DeviceType getDeviceType() {
		return deviceType;
	}
	/**
	 * @param deviceType the deviceType to set
	 */
	public void setDeviceType(DeviceType deviceType) {
		this.deviceType = deviceType;
	}
	/**
	 * @return the addressType
	 */
	public AddressType getAddressType() {
		return addressType;
	}
	/**
	 * @param addressType the addressType to set
	 */
	public void setAddressType(AddressType addressType) {
		this.addressType = addressType;
	}
	/**
	 * @return the address
	 */
	public Integer getAddress() {
		return address;
	}
	/**
	 * @param address the address to set
	 */
	public void setAddress(Integer address) {
		this.address = address;
	}
	/**
	 * @return the count
	 */
	public Integer getCount() {
		return count;
	}
	/**
	 * @param count the count to set
	 */
	public void setCount(Integer count) {
		this.count = count;
	}
}
